# Contributor: Damian Kurek <starfire24680@gmail.com>
# Maintainer: Damian Kurek <starfire24680@gmail.com>
pkgname=kodi-inputstream-adaptive
pkgver=19.0.7
_realname=Matrix
pkgrel=0
pkgdesc="kodi inputstream addon for several manifest types"
url="https://github.com/peak3d/inputstream.adaptive"
arch="x86 x86_64 aarch64" # tests fail on armv7
license="GPL-2.0-only"
makedepends="cmake expat-dev kodi-dev"
source="$pkgname-$pkgver-$_realname.tar.gz::https://github.com/peak3d/inputstream.adaptive/archive/$pkgver-$_realname.tar.gz"
builddir="$srcdir/inputstream.adaptive-$pkgver-$_realname"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_MODULE_PATH=/usr/lib/cmake/kodi \
		-DUSE_LTO=1
	make -C build
}

check() {
	make -C build test
}

package() {
	make -C build DESTDIR="$pkgdir" install
}

sha512sums="
e0cc3a7a153a32628ae0c56a98d662105f8de505ced2b8680afef3f11ee1a847af44c60fbe1ad40c6ad710ad382786b0adbea38e2a2d400c95fc42d1c9493d90  kodi-inputstream-adaptive-19.0.7-Matrix.tar.gz
"
